package com.simple.system.controller;

import com.simple.system.entity.SysMenu;
import com.simple.system.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/menus")
@CrossOrigin(origins = "*", maxAge = 3600)
public class SysMenuController {
    @Autowired
    private SysMenuService menuService;

    @GetMapping
    public List<SysMenu> getMenuList() {
        return menuService.getMenuList();
    }
}    